﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMI.NET.CIM
{
    /// <summary>
    /// The CIM_ActionSequence association defines a series of operations that transition the software element (referenced by the CIM_SoftwareElementActions association) to its next state, or removes the software element from its current state.
    /// The next-state actions and uninstall actions associated with a particular software element must be a continuous sequence. Since CIM_ActionSequence is an association, the loops on the CIM_Action class, with roles for the "prior" action and "next" action, form a sequence.
    /// The need for a continuous sequence implies:
    ///    Within the set of next-state or uninstall actions, there is only one action that does not have an instance of the CIM_ActionSequence association referencing it in the "next" role. This is the first action in the sequence.
    ///    Within the set of next-state or uninstall actions, there is only one action that does not have an instance of the CIM_ActionSequence association referencing it in the "prior" role. This is the last action in the sequence.
    ///    All other actions within the set of next-state and uninstall actions must participate in two instances of the CIM_ActionSequence association, one in a "prior" role and one in the "next" role.
    /// </summary>
    public class CIM_ActionSequence
    {

        private CIM_Action _Next;
        private CIM_Action _Prior;

        /// <summary>
        /// Reference to the next action.
        /// </summary>
        public CIM_Action Next { get { return _Next; } }

        /// <summary>
        /// Reference to the prior action.
        /// </summary>
        public CIM_Action Prior { get { return _Prior; } }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public CIM_ActionSequence(ManagementBaseObject mbo)
        {
            _Next = new CIM_Action(mbo);
            _Prior = new CIM_Action(mbo);
        }

    }
}
